<script>
var user = "<%=(session[:username]||"visitor")%>";
</script>

<% if @note.sponsor == 0 || @note.sponsor == @user.id %>

<div id='palette' style="width:40px;height:120px">
<input type=submit value="note"     onclick="ScrapbookServer({title:'My Note',editor:'Click here to change this text',top:100,left:200,width:100,height:180})"/><br/>
<input type=submit value="chat"     onclick="ScrapbookServer({title:'Chat',top:100,left:340,width:200,height:180,logic: &quot;function(w){Chatter.make(w.content,null,user)}&quot;})"/><br/>
<input type=submit value="map"      onclick="ScrapbookServer({title:'Map',top:400,left:20,width:300,height:180,logic: &quot;function(w){Mapper.make(w.content)}&quot;})"/><br/>
<input type=submit value="visitors" onclick="ScrapbookServer({title:'Recent Visitors',top:400,left:400,width:300,height:180,logic: &quot;function(w){Visitors.make(w.content)}&quot;})"/><br/>
<input type=submit value="site"     onclick="ScrapbookServer({title:'Website',url:'http://mediaventure.org',top:400,left:800,width:300,height:180})"/><br/>
</div>

<% end %>

<script>

  // Start windowing system
  ScrapbookStart();

<% if @note.sponsor == 0 || @note.sponsor == @user.id %>

  // Make a palette
  ScrapbookLocal({title: "Palette",top:300, left:20, width:50, height:120, attach:'palette'});

<% end %>

</script>
